package createThread.TwoThreadisEqual;

import createThread.TwoThread.Thread1;
import createThread.TwoThread.Thread2;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @program: jvm
 * @description
 * @author: tkk fendoukaoziji
 * @create: 2019-04-10 20:35
 **/
public class TestThrad {
    public static void main(String[] args) {
        ExecutorService fix1 = Executors.newFixedThreadPool(1);
        ExecutorService single = Executors.newSingleThreadExecutor();
        fix1.execute(new Thread1());
        fix1.shutdown();
        single.execute(new Thread2());
        single.shutdown();
    }
}
/*
*线程池 这两种一样吗？
*
*
*
*
*
*
*
*
* */